# Overview
This repository contains Stata .do files and datasets needed for replicating the results in "Replicating the literature on prefecture-level meritocratic promotion in China". This paper reanalyzes Yao and Zhang (2015), Li et al. (2019), and Chen and Kung (2019). To replicate the results, run the file `run.do` using Stata (version 16). The data is from the corresponding replication packages of the three papers, and is included here. You should expect the code to run for 2 hours.

# Data availability
All data is included in this archive. The Yao and Zhang (2015) data is available on the article page online; it can be downloaded directly with no registration. The Li et al. (2019) data is available on the article page online; downloading requires a subscription to the journal. The Chen and Kung (2019) data is available from the Harvard Dataverse (CC0 1.0 License); it can be downloaded directly with no registration. 

# Statement about rights
I certify that the author of the manuscript has legitimate access to and permission to use the data used in this manuscript.

# License
The data and code are licensed under a Modified BSD/Creative Commons license. See LICENSE.txt for details.

# Details on each data source
The directory 'code/' contains three subdirectories (one for each paper) with data and code to carry out my reanalyses.
Each directory also contains a derived dataset with only the promotion variables; these are used to compare the promotion rates across datasets (promotion_yz.dta, promotion_li.dta, promotion_ck.dta).

- Yao and Zhang (2015) uses an original dataset of politicians and macroeconomic data. The dataset Leader_Growth_logsc.dta is produced from the original Yao and Zhang code.

Datafiles in Stata format, located in code/yz_replication/:
Leader_Growth.dta
Leader_Growth_logsc.dta

Derived datafiles created by the cleaning code:
promotion_yz.dta

- Li et al. (2019) uses an original dataset on politiicans, growth targets, and economic performance from public sources.

Datafiles in Stata format, located in code/li_etal_replication/:
promotion.csv
Note that the original file has mislabeled column headers; I correct them in the included file.

Derived datafiles created by the cleaning code:
promotion_li.dta

- Chen and Kung (2019) uses an original dataset on politicians, land transactions, and economic performance. I also obtained raw leader-level from James Kung. This section uses promotion data from Wiebe (2020).

Datafiles in Stata format, located in code/ck_replication/:
prefecture_panel.dta
prefecture_leaders.dta (from James Kung)
promotion_wiebe.dta (from Wiebe (2020))

Derived datafiles created by the cleaning code:
promotion_ck.dta

# Computational requirements
- Stata version 16
- Required Stata packages are included in code/libraries/stata, so that the user does not have to download anything and the replication can be run offline. The file code/_config.do tells Stata to load packages from this location. The packages are: ftools reghdfe tsspell blindschemes estout cmp ghk2 panelcombine felsdvreg.
- I ran the code on an 8-core Intel i7 laptop with 16GB RAM. It takes approximately 2 hours to run the code.

# Description of code
- This file cleans the data and generates the results in the Yao and Zhang section:
code/yz_replication/yao_zhang.do

- This file cleans the data and generates the results in the Li et al. section:
code/li_etal_replication/li_etal.do

- This file creates datasets with promotion variables for each of the three papers; cleans the Chen and Kung data; and generates the results in the Chen and Kung section:
code/ck_replication/chen_kung.do

# Instructions for replicators
- Edit line 2 in run.do to set the path to the folder containing this README
- Run run.do
- Figures and tables are saved to the corresponding directory in output/.

# List of tables and programs
The provided code reproduces all numbers provided in text in the paper, as well as all tables and all but one figure in the paper.

- Table 1: saved to output/yao_zhang/table1.tex by code/yz_replication/yao_zhang.do on line 56
- Table A2: saved to output/yao_zhang/table_a2.tex by code/yz_replication/yao_zhang.do on line 84
- Table 2: saved to output/yao_zhang/table2.tex by code/yz_replication/yao_zhang.do on line 132
- Table A6: saved to output/yao_zhang/table_a6.tex by code/yz_replication/yao_zhang.do on line 179
- Table A7: saved to output/yao_zhang/table_a7.tex by code/yz_replication/yao_zhang.do on line 226
- Table A3: saved to output/yao_zhang/table_a3.tex by code/yz_replication/yao_zhang.do on line 282
- Table A8: saved to output/yao_zhang/table_a8.tex by code/yz_replication/yao_zhang.do on line 331
- Table A4: saved to output/yao_zhang/table_a4.tex by code/yz_replication/yao_zhang.do on line 541
- Table A9: saved to output/yao_zhang/table_a9.tex by code/yz_replication/yao_zhang.do on line 740
- Table A5: saved to output/yao_zhang/table_a5.tex by code/yz_replication/yao_zhang.do on line 936
- Table A10: saved to output/yao_zhang/table_a10.tex by code/yz_replication/yao_zhang.do on line 1129

- Figure 1: this is a screenshot of the original Li et al. (2019) Table 5. Reproducing the table requires the proprietary software Tomlab.
- Table 3: saved to output/li_etal/table3.tex by code/li_etal_replication/li_etal.do on line 79
- Table 4: saved to output/li_etal/table4.tex by code/li_etal_replication/li_etal.do on line 92
- Table A11: saved to output/li_etal/table_a11.tex by code/li_etal_replication/li_etal.do on line 106
- Figure A1: saved to output/li_etal/fig_a1.pdf by code/li_etal_replication/li_etal.do on line 122

- Figure 3: saved to output/chen_kung/fig3.pdf by code/ck_replication/chen_kung.do on line 147
- Table A13: saved to output/chen_kung/table_a13.tex by code/ck_replication/chen_kung.do on line 163
- Table A12: saved to output/chen_kung/table_a12.tex by code/ck_replication/chen_kung.do on line 184
- Table 5: saved to output/chen_kung/table5.tex by code/ck_replication/chen_kung.do on line 276
- Figure 2: saved to output/chen_kung/fig2.pdf by code/ck_replication/chen_kung.do on line 335

# References:
Chen T and Kung JKS. (2019). Busting the “princelings”: The campaign against corruption in china’s primary land market. The Quarterly Journal of Economics 134(1): 185–226.

Chen, Ting; Kung, James Kai-sing, 2018, "Replication Data for: 'Busting the ‘Princelings’: The Campaign against Corruption in China’s Primary Land Market'", https://doi.org/10.7910/DVN/XW6OJT, Harvard Dataverse

Li X, Liu C, Weng X and Zhou LA. (2019). Target Setting in Tournaments: Theory and Evidence from China. The Economic Journal 129(623): 2888–2915. https://academic.oup.com/ej/article-abstract/129/623/2888/5492257

Yao Y and Zhang M. (2015). Subnational leaders and economic growth: evidence from chinese cities. Journal of Economic Growth 20: 405–436. https://link.springer.com/article/10.1007/s10887-015-9116-1

Wiebe, M. (2020). Essays in Chinese political economy. PhD Thesis, University of British Columbia. https://open.library.ubc.ca/soa/cIRcle/collections/ubctheses/24/items/1.0395341